import 'package:json_annotation/json_annotation.dart';

part 'group_message.g.dart';

@JsonSerializable(explicitToJson: true, anyMap: true)
class GroupMessage {
  final int userId;
  final String messageType;
  final int targetGroupId;
  @JsonKey(includeIfNull: false)
  final String? message;
  // final ActionType? actionType;

  GroupMessage({
    required this.userId,
    required this.messageType,
    required this.targetGroupId,
    this.message,
    // this.actionType,
  });

  factory GroupMessage.fromJson(Map<String, dynamic> json) =>
      _$GroupMessageFromJson(json);

  Map<String, dynamic> toJson() => _$GroupMessageToJson(this);
}
